package com.hdu.other.tanxin;


import java.util.Arrays;

public class lc1921 {
    class Solution {
        public int eliminateMaximum(int[] dist, int[] speed) {
            int[] times = new int[dist.length];
            for (int i = 0; i < dist.length; i++) {
                times[i] = (dist[i] + speed[i] - 1) / speed[i];
            }
            Arrays.sort(times);
            for (int i = 0; i < times.length; i++)
            {
                if (times[i] <= i) return i;
            }
            return times.length;
        }
    }
}
